/** * */

<template>
  <div>
    <input :value="myValue" @input="handleInput($event.target.value)" />
  </div>
</template>

<script>
export default {
  name: 'inputTest1',
  model: {
    prop: 'value',
    event: 'change',
  },
  props: {
    value: [String, Number],
  },
  watch: {
    value: {
      immediate: true,
      handler(newValue, oldValue) {
        this.myValue = newValue
      },
    },
  },
  data() {
    return {
      myValue: undefined,
    }
  },
  methods: {
    handleInput(value) {
      this.$emit('change', value)
    },
  },
}
</script>

<style></style>
